Skip to content

Conversation

@j1wonpark
Copy link
Contributor

Why are the changes needed?

When the self-optimizing.group property of a table is changed (either directly or through catalog default settings), the group_name column in the table_runtime database table is not updated during table refresh. This causes:

  1. Tables remain bound to the old optimizer group even after configuration changes
  2. handleConfigChanged() uses stale group_name from DB for queue binding
  3. Tables get stuck in pending status permanently when the original optimizer group no longer exists

Root Cause: DefaultTableRuntime.refresh() method was missing updateGroup() call in the store transaction.

Brief change log

  • DefaultTableRuntime.java: Added updateGroup(g -> newGroupName) call in refresh() method to update the group_name column in DB when optimizer group changes
  • TestDefaultTableRuntimeHandler.java: Added testRefreshUpdatesOptimizerGroup() test to verify that getGroupName() returns the new group name after refresh

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

Signed-off-by: j1wonpark <jpark92@outlook.kr>
@github-actions github-actions bot added the module:ams-server Ams server module label Feb 5, 2026
Copy link
Contributor

@czy006 czy006 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@klion26 klion26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@j1wonpark Thanks for the contribution, the change looks good to me, I left another inline comment to be considered (in the current pr or a followup pr)

Signed-off-by: jpark92@outlook.kr
Signed-off-by: Jiwon Park <jpark92@outlook.kr>
@czy006 czy006 merged commit 48457b7 into apache:master Feb 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:ams-server Ams server module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants